<!--
 * @Author: wangjian
 * 656876071@qq.com
 * @Date: 2024-08-12 16:05:21
 * @LastEditTime: 2024-09-20 10:11:57
 * @FilePath: src/views/sys/user/UserForm.vue
 * @Description: 
 -->
<script setup lang="ts">
import {useForm} from './Hooks'
import {SIMPLE_FORM_SUBMIT_KEY} from "@/core/common/hooks/FormHooks";
import {ref, watch} from "vue";
import {useMenu} from "@/views/sys/api/SysMenuApi";
import type {Ret} from "@/core/utils/request";

const callback = defineEmits([SIMPLE_FORM_SUBMIT_KEY])
const {
  form,
  modalIsVisible,
  modalIsSubmitting,
  modalSubmit,
  showEditForm,
  showAddForm,
} = useForm(callback)

defineExpose({
  showAddForm,
  showEditForm
})


</script>

<template>
  <a-modal v-model:open="modalIsVisible" title="用户维护" width="30rem" :maskClosable="false">
    <template #footer>
      <a-button key="back" @click="modalIsVisible = false">取消</a-button>
      <a-button :loading="modalIsSubmitting" key="submit" type="primary" @click="modalSubmit">录入</a-button>
    </template>
    <a-form :disabled="modalIsSubmitting" :label-col="{span:5}" :wrapper-col="{span: 18}" label-align="right">
      <a-form-item label="用户id">
        <a-input v-model:value="form.userId" placeholder="请输入"/>
      </a-form-item>
      <a-form-item label="登录名">
        <a-input v-model:value="form.loginName" placeholder="请输入"/>
      </a-form-item>
      <a-form-item label="系统内昵称">
        <a-input v-model:value="form.nickName" placeholder="请输入"/>
      </a-form-item>
      <a-form-item label="密码">
        <a-input v-model:value="form.password" placeholder="请输入"/>
      </a-form-item>
      <a-form-item label="手机号">
        <a-input v-model:value="form.phone" placeholder="请输入"/>
      </a-form-item>
      <a-form-item label="头像">
        <a-input v-model:value="form.avatar" placeholder="请输入"/>
      </a-form-item>
<!--      <a-form-item label="部门">-->
<!--        <a-input v-model:value="form.deptId" placeholder="请输入角色名称"/>-->
<!--      </a-form-item>-->
<!--      <a-form-item label="职位">-->
<!--        <a-input v-model:value="form.jobId" placeholder="请输入角色名称"/>-->
<!--      </a-form-item>-->
      <a-form-item label="启用、冻结、注销">
        <a-input v-model:value="form.status" placeholder="请输入角色名称"/>
      </a-form-item>
      <a-form-item label="备注信息">
        <a-input v-model:value="form.remark" placeholder="请输入角色名称"/>
      </a-form-item>
    </a-form>
  </a-modal>
</template>

<style scoped>

</style>